#ifndef SLICE2D_H
#define SLICE2D_H

class slice2D
{
public:
	slice2D(void*data, int pixelByteSize, int dimY, int dimX);
	slice2D(int pixelByteSize, int dimY, int dimX);
	~slice2D();

	slice2D* generateShrinkedSlice(int minX, int maxX, int minY, int maxY);

	int getDimX();
	int getDimY();

	unsigned int getPixel(int y, int x);
	void setPixel(int y, int x, unsigned int value);

	unsigned int getPixel(double y, double x);
	unsigned int getPixelNearest(double y, double x);
	unsigned int getPixelBilinear(double y, double x);
	slice2D* slice2D::resize(double factor);

	//debug
	bool writeToFile(const char* filename);
	void print();

private:
	void* _data;
	int _pixelByteSize;
	int _dimX, _dimY;

	
};

#endif